package com.dragon.modules.yuegou.model.coupon;

import com.dragon.modules.yuegou.entity.coupon.CouponTemplateStockRecordEntity;
import com.dragon.modules.yuegou.enums.coupon.CouponTemplateStockRecordStockType;
import com.dragon.modules.yuegou.enums.coupon.CouponTemplateStockRecordType;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 券库存变更记录模型类
 * 
 * @author pbuilder generated
 * @date 2020-06-30 17:39:39
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class CouponTemplateStockRecord extends CouponTemplateStockRecordEntity {

	/**
	 * 构造一个空券库存变更记录模型对象
	 */
	public CouponTemplateStockRecord(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个券库存变更记录模型对象
	 * 
	 * @param entity 实体对象
	 */
	public CouponTemplateStockRecord(CouponTemplateStockRecordEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个券库存变更记录模型对象
	 * 
	 * @param other 其它对象
	 */
	public CouponTemplateStockRecord(CouponTemplateStockRecord other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getCouponTemplateId() {
    	return couponTemplateId;
    }

    /**
	 * 设置模板ID
	 * 
	 * @param couponTemplateId 模板ID
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord couponTemplateId(String couponTemplateId) {
    	this.couponTemplateId = couponTemplateId;
    	return this;
    }

	@Override
	public Integer getTotal() {
    	return total;
    }

    /**
	 * 设置总量
	 * 
	 * @param total 总量
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord total(Integer total) {
    	this.total = total;
    	return this;
    }

	@Override
	public Integer getStock() {
    	return stock;
    }

    /**
	 * 设置库存
	 * 
	 * @param stock 库存
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord stock(Integer stock) {
    	this.stock = stock;
    	return this;
    }

	@Override
	public Integer getChange() {
    	return change;
    }

    /**
	 * 设置变化值
	 * 
	 * @param change 变化值
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord change(Integer change) {
    	this.change = change;
    	return this;
    }

	@Override
	public CouponTemplateStockRecordStockType getStockType() {
    	return stockType;
    }

    /**
	 * 设置[枚举]库存类型：0-入库-IN、1-出库-OUT
	 * 
	 * @param stockType [枚举]库存类型：0-入库-IN、1-出库-OUT
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord stockType(CouponTemplateStockRecordStockType stockType) {
    	this.stockType = stockType;
    	return this;
    }

	@Override
	public CouponTemplateStockRecordType getType() {
    	return type;
    }

    /**
	 * 设置[枚举]库存变更类型：0-新增券-INIT、1-后台编辑-EDIT、3-会员领取-RECEIVE
	 * 
	 * @param type [枚举]库存变更类型：0-新增券-INIT、1-后台编辑-EDIT、3-会员领取-RECEIVE
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord type(CouponTemplateStockRecordType type) {
    	this.type = type;
    	return this;
    }

	@Override
	public String getCreatedBy() {
    	return createdBy;
    }

    /**
	 * 设置创建人ID
	 * 
	 * @param createdBy 创建人ID
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord createdBy(String createdBy) {
    	this.createdBy = createdBy;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置创建时间
	 * 
	 * @param createdTime 创建时间
	 * @return 当前对象
	 */
    public CouponTemplateStockRecord createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }
}
